package cn.bearspark.sms.provider.key;

import cn.bearspark.framework.redis.starter.key.RedisKeyBuilder;
import org.springframework.stereotype.Component;

/**
 * 短信模块中 redis 缓存键的构造器
 *
 * @author f
 */
@Component
public class SmsCacheKeyBuilder extends RedisKeyBuilder {

    /**
     * 登录短信验证码键的前缀
     */
    private static final String LOGIN_CODE_KEY = "loginCode";

    public String buildLoginCodeKey(String phone) {
        return super.getPrefix() + LOGIN_CODE_KEY + super.getSplitItem() + phone;
    }

}
